import {
	getUserInfo
} from "@/cookie";


export const HOME = '/pages/index/index'
export const PATH = 'http://www.jackysuen.top/joyletter'
export const handleToAttest = () => {
	const info = getUserInfo()
	console.log(info)
	if (!info.isRz || info.isRz === '0') {
		uni.navigateTo({
			url: '/pages/user/attest1'
		})
		return
	}
	if (!info.isBank || info.isBank === '0') {
		uni.navigateTo({
			url: '/pages/user/attest2'
		})
		return
	}
	if (!info.isPay || info.isPay === '0') {
		uni.navigateTo({
			url: '/pages/user/withdraw'
		})
	}
}
export const changeTabbar = (isPay) => {

	if (isPay === '1') { //已支付
		uni.setTabBarItem({
			index: 1,
			pagePath: '/pages/order/member',
			text: '会员权益'
		})
		uni.setTabBarItem({
			index: 2,
			pagePath: '/pages/order/interests',
			text: '新手推荐'
		})
		uni.setTabBarItem({
			index: 0,
			pagePath: '/pages/index/index2',
			text: '权益'
		})
	} else { //未支付
		uni.setTabBarItem({
			index: 1,
			pagePath: "pages/order/index",
			text: "订单"
		})
		uni.setTabBarItem({
			index: 1,
			pagePath: "pages/interests/index",
			text: "订单"
		})

	}
}
